<span th:replace="layout/header::common_header" xmlns:th="http://www.w3.org/1999/xhtml"
      xmlns:shiro="http://www.w3.org/1999/xhtml"></span>
        <style>
            .bootstrap-table .fixed-table-container .fixed-table-body{
                height:auto!important;
            }
            .auth-offset .example-box{
                padding: 5px;
            }
        </style>
        <!--页面主要内容-->
        <main class="lyear-layout-content" xmlns:th="http://www.w3.org/1999/xhtml">

            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="panel panel-default">
                                <div class="panel-body">
                                    <form id="formSearch" class="form-horizontal">
                                        <div class="form-group" style="margin-top:15px">
                                            <div class="row col-sm-12">
                                            <label class="control-label col-sm-1" for="txt_search_username">用户名称</label>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" id="txt_search_username" value="">
                                            </div>
                                            <label class="control-label col-sm-1" for="txt_search_nickname">昵称</label>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" id="txt_search_nickname" value="">
                                            </div>
                                            <label class="control-label col-sm-1" for="txt_search_mobile">手机号</label>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" id="txt_search_mobile" value="">
                                            </div>
                                            </div>
                                            <div class="row col-sm-12" style="padding-top: 10px;">
                                            <label class="control-label col-sm-1" for="txt_search_email">邮箱地址</label>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" id="txt_search_email" value="">
                                            </div>
                                            <label class="control-label col-sm-1" for="txt_search_qq">qq</label>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" id="txt_search_qq" value="">
                                            </div>
                                            <div class="col-sm-2" style="text-align:left;">
                                                <button type="button" style="margin-left:50px"  class="btn btn-primary" onclick="refreshData(this)">查询</button>
                                            </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div id="toolbar"  class=" toolbar-btn-action">
                                <div style="display: contents" shiro:hasPermission="user:add">
                                    <a class="btn btn-primary m-r-5" href="#" id="shiro-add"  data-toggle="modal" data-target="#addModal"><i class="mdi mdi-plus"></i> 新增</a>
                                </div>
                                <div style="display: contents" shiro:hasPermission="user:edit">
                                    <a class="btn btn-warning m-r-5" href="#!" id="shiro-edit"  onclick="ShowDiv('EditDiv')"><i class="mdi mdi-block-helper"></i>编辑</a>
                                </div>
                                <div style="display: contents" shiro:hasPermission="user:delete">
                                    <a class="btn btn-danger" href="#!" id="shiro-delete" onclick="ShowDiv('DelDiv')"><i class="mdi mdi-window-close"></i> 删除</a>
                                </div>
                            </div>
                            <div class="table-responsive">
                                <table class="table table-bordered" id="tb_departments"></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- add模态框（Modal） -->
            <div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                            <h4 class="modal-title" id="myModalLabel">添加</h4>
                        </div>
                        <div class="modal-body ">
                            <form class="form-horizontal " id="addformData" role="form">
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">用户名称</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control"  name="username" value=""
                                               placeholder="昵称">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">密码</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control"  name="password" value=""
                                               placeholder="密码">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">昵称</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control"  name="nickname" value=""
                                               placeholder="昵称">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">手机号</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="mobile" value=""
                                               placeholder="手机号">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">邮箱地址</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="email" value=""
                                               placeholder="邮箱地址">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">QQ</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="qq" value=""
                                               placeholder="QQ">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">性别</label>
                                    <div class="col-sm-10 example-box">
                                        <label class="lyear-radio radio-inline radio-primary">
                                            <input type="radio" class="add-male" name="gender" value="1" checked="true"><span>男</span>
                                        </label>
                                        <label class="lyear-radio radio-inline radio-primary">
                                            <input type="radio" class="add-female" name="gender" value="2"><span>女</span>
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">头像地址</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="avatar" value=""
                                               placeholder="邮箱">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">描述</label>
                                    <div class="col-sm-10">
                                <textarea  class="form-control"  name="remark" value=""
                                           placeholder="描述">

                                </textarea>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary " onclick="addData()">提交</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->
            </div>
            <!-- edit模态框（Modal） -->
            <div class="modal fade" id="editModel" tabindex="-1" role="dialog" aria-labelledby="myModalEeditLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                            <h4 class="modal-title" id="myModalEeditLabel">编辑</h4>
                        </div>
                        <div class="modal-body ">
                            <form class="form-horizontal" id="editformData" role="form">
                                <input  type="hidden" name="id" value="" />
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">昵称</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control"  name="nickname" value=""
                                               placeholder="昵称">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">密码</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control"  name="password" value=""
                                               placeholder="密码">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">手机号</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="mobile" value=""
                                               placeholder="手机号">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">邮箱地址</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="email" value=""
                                               placeholder="邮箱地址">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">QQ</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="qq" value=""
                                               placeholder="QQ">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">性别</label>
                                    <div class="col-sm-10 example-box">
                                        <label class="lyear-radio radio-inline radio-primary">
                                            <input type="radio" class="edit-male" name="gender" value="1" checked="true"><span>男</span>
                                        </label>
                                        <label class="lyear-radio radio-inline radio-primary">
                                            <input type="radio" class="edit-female" name="gender" value="2"><span>女</span>
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">状态</label>
                                    <div class="col-sm-10 example-box">
                                        <label class="lyear-radio radio-inline radio-primary">
                                            <input type="radio" class="enable-status" name="status" value="1"><span>启用</span>
                                        </label>
                                        <label class="lyear-radio radio-inline radio-primary">
                                            <input type="radio" class="disable-status" name="status" value="0"><span>禁用</span>
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">头像地址</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="avatar" value=""
                                               placeholder="头像地址">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label  class="col-sm-2 control-label">描述</label>
                                    <div class="col-sm-10">
                                <textarea  class="form-control"  name="remark" value=""
                                           placeholder="描述">

                                </textarea>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary " onclick="editData()">提交</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->
            </div>
            <!-- 权限模态框（Modal） -->
            <div class="modal fade" id="authModel" tabindex="-1" role="dialog" aria-labelledby="myModalauthLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                            <h4 class="modal-title" id="myModalauthLabel">分配权限</h4>
                        </div>
                        <form class="form-horizontal" id="authformData" role="form">
                            <input  type="hidden" id="userId" name="userId" value="" />
                            <div class="form-group">
                                <div class="modal-body auth-offset">
        <!--                            <div class="col-sm-12 example-box">-->
        <!--                                <label class="lyear-radio radio-inline radio-primary">-->
        <!--                                    <input type="radio" class="type-menu" name="role" value=""><span>请选择权限</span>-->
        <!--                                </label>-->
        <!--                            </div>-->
                                </div>
                            </div>
                        </form>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary " onclick="authData()">提交</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->
            </div>
            <div id="operateDiv" style="display: none;">
                <div style="display: contents" shiro:hasPermission="user:edit">
                    <a href="javascript:void(0);"  id="edit_" uniqueId=""><span class="glyphicon glyphicon-pencil" title="修改"></span></a>
                </div>
                <div style="display: contents" shiro:hasPermission="user:delete">
                    <a href="javascript:void(0);"  id="del_" uniqueId=""><span class="glyphicon glyphicon-trash"  title="删除"></span></a>
                </div>
                <div style="display: contents" shiro:hasPermission="role:allotResource">
                    <a href="javascript:void(0);"  id="auth_" uniqueId=""><span class="glyphicon glyphicon-th-large"  title="分配权限"></span></a>
                </div>
            </div>
        </main>
        <!--End 页面主要内容-->
<span th:replace="layout/footer::common_footer" xmlns:th="http://www.w3.org/1999/xhtml"></span>

<!-- 进入页面请求获取权限列表 -->
<script type="text/javascript">
    //关闭add模态框，清空表单
    $('body').on('hidden.bs.modal', '#authModal', function () {

        $(this).removeData('bs.modal');

    });

    $.ajax({
        url:"/roles/useList",
        type:"post",
        success: function (e) {
            if(e.status == 200){
                var list = e.data;
                for (var dict = 0; dict<list.length; dict++){
                    $(".auth-offset").append('<div class="col-sm-12 example-box ">\n' +
                        '                                <label class="lyear-radio radio-inline radio-primary" >\n' +
                        '                                    <input type="radio" id="auth-'+list[dict].id+'" name="roleId" value="'+list[dict].id+'"><span >'+list[dict].description+'</span>\n' +
                        '                                </label>\n' +
                        '                            </div>')
                }
            }
        }
    })
</script>
<!--添加-->
<script type="text/javascript">
    //关闭add模态框，清空表单
    $('body').on('hidden.bs.modal', '#addModal', function () {
        document.getElementById("addformData").reset();
        //性别默认选择男性
        $(".add-male").trigger("click");
        // $(this).removeData('bs.modal');

    });

    //添加数据
    function addData() {
        //提交数据
        var data = $('#addformData').serializeArray();
        $.ajax({
            url:"/users/addPost",
            async: false,
            type: 'post',
            data: data,
            success:function (e){
                //200成功， 500错误
                if(e.status == 200){
                    layer.msg(e.message, {icon: 1, time:2000},function (index) {
                        if (e.status == 200) {
                            //关闭对话框
                            $("#addModal").modal("hide");
                            //清空模态框（Modal）表单
                            document.getElementById("addformData").reset();
                            //刷新表格
                            $("#tb_departments").bootstrapTable('refresh');
                        }
                    });
                } else {
                    layer.msg(e.message, {icon:2, time:2000});
                }

            }
        });
    }
</script>
<!--编辑删除-->
<script type="text/javascript">

    //关闭edit模态框，清空表单
    $('body').on('hidden.bs.modal', '#editModal', function () {
        document.getElementById("editformData").reset();
        //性别默认选择男性
        // $(".edit-male").trigger("click");
        // $(this).removeData('bs.modal');

    });
    
    //权限保存
    function authData() {
        var data = $('#authformData').serializeArray();
        $.ajax({
            url:"/userRoles/roleEditPost",
            async: false,
            type: 'post',
            data: data,
            success:function (e){
                //200成功， 500错误
                if(e.status == 200){
                    layer.msg(e.message, {icon: 1, time:2000},function (index) {
                        if (e.status == 200) {
                            //关闭对话框
                            $("#authModel").modal("hide");
                            //清空模态框（Modal）表单
                            document.getElementById("authformData").reset();
                            //刷新表格
                            $("#tb_departments").bootstrapTable('refresh');
                        }
                    });
                } else {
                    layer.msg(e.message, {icon:2, time:2000});
                }
            }
        });
    }

    //保存修改
    function editData() {
        //提交数据
        var data = $('#editformData').serializeArray();
        $.ajax({
            url:"/users/editPost",
            async: false,
            type: 'post',
            data: data,
            success:function (e){
                //200成功， 500错误
                if(e.status == 200){
                    layer.msg(e.message, {icon: 1, time:2000},function (index) {
                        if (e.status == 200) {
                            //关闭对话框
                            $("#editModel").modal("hide");
                            //清空模态框（Modal）表单
                            document.getElementById("editformData").reset();
                            //刷新表格
                            $("#tb_departments").bootstrapTable('refresh');
                        }
                    });
                } else {
                    layer.msg(e.message, {icon:2, time:2000});
                }

            }
        });
    }

    //弹出隐藏层：修改， 删除
    function ShowDiv(show_div) {
        var selectedRow = $('#tb_departments').bootstrapTable('getSelections');
        selectedRow = selectedRow[0];
        // console.log(selectedRow);
        if (selectedRow == null || selectedRow.length == 0) {
            layer.msg("请选择要修改的记录");
            return false;
        }
        if (show_div == "EditDiv") {
            //模态框赋值
            $("#editformData input[name='id']").val(selectedRow.id);
            $("#editformData input[name='nickname']").val(selectedRow.nickname);
            $("#editformData input[name='password']").val(selectedRow.password);
            $("#editformData input[name='mobile']").val(selectedRow.mobile);
            $("#editformData input[name='email']").val(selectedRow.email);
            $("#editformData input[name='qq']").val(selectedRow.qq);
            $("#editformData input[name='email']").val(selectedRow.email);
            $("#editformData textarea[name='remark']").val(selectedRow.remark);
            $("#editformData textarea[name='status']").val(selectedRow.status);
            //性别单选按钮选中状态
            var gender = selectedRow.gender;
            if(gender == "1"){
                $(".edit-male").trigger("click");
            } else {
                $(".edit-female").trigger("click");

            }
            //用户状态
            var status = selectedRow.status;
            if(status == "1"){
                $(".enable-status").trigger("click");
            }else{
                $(".disable-status").trigger("click");
            }

            //显示编辑模态框
            $("#editModel").modal("show");
        }
        //删除
        if(show_div == 'DelDiv'){
            //询问框
            layer.confirm('确定要删除吗？', {
                btn: ['确定','取消'] //按钮
            }, function(){
                $.ajax({
                    url:"/users/delUser",
                    async: false,
                    type: 'post',
                    data: {id:selectedRow.id},
                    success:function (e){
                        if(e.status == 200){
                            layer.msg(e.message, {icon:1, time:2000},function (index) {
                                //刷新表格
                                $("#tb_departments").bootstrapTable('refresh');
                            });
                        }else{
                            layer.msg(e.message, {icon:2, time:2000});
                        }
                    }
                });
            }, function(){
                layer.closeAll('dialog');
            });
        }
    };

    //编辑行:对修改按钮绑定事件
    $("#tb_departments").on("click", "[id^='edit_']", function () {
        //点击获取行信息
        var uniqueId = $(this).attr("uniqueId");
        var aa = $("#tb_departments").bootstrapTable('getRowByUniqueId',uniqueId);

        ShowDiv("EditDiv");

    });

    //删除行
    $("#tb_departments").on("click", "[id^='del_']", function () {
        //主键id
        var uniqueId = $(this).attr("uniqueId");
        //获取单行信息jquery tigger取消点击
        var aa = $("#tb_departments").bootstrapTable('getRowByUniqueId',uniqueId);

        ShowDiv("DelDiv");
    });

    //分配权限
    $("#tb_departments").on("click", "[id^='auth_']", function () {
        //主键id
        var uniqueId = $(this).attr("uniqueId");
        //获取单行信息
        var aa = $("#tb_departments").bootstrapTable('getRowByUniqueId',uniqueId);
        var auth = aa.sysUserRole;
        //权限点击
        if(auth){
            $("#auth-"+auth.roleId).parent().trigger("click");
        } else{
            $("input:radio").removeAttr("checked");
        }

        //userId赋值
        $("#userId").val(uniqueId);

        //显示auth模态框
        $("#authModel").modal("show");
    });
</script>

<script type="text/javascript">

    //操作按钮权限控制
    function getPermission ( value, row, index ) {
        var html = "";
        $("#operateDiv").find("a").each(function(){
            var _srcid      = $(this).attr("id");
            var _id         = _srcid + index;
            var _uniqueId   = row.id;
            $(this).attr("id", _id);//笔者对按钮的id属性进行赋值
            $(this).attr("uniqueId", _uniqueId);//笔者对按钮的uniqueId属性进行赋值
            html += this.outerHTML + "&nbsp;&nbsp;&nbsp;&nbsp;";
            $(this).attr("id", _srcid);
        });
        return html;
    }

    $(function () {
        //1.初始化Table
        var oTable = new TableInit();
        oTable.Init();

        //2.初始化Button的点击事件
        var oButtonInit = new ButtonInit();
        oButtonInit.Init();
    });

    var ButtonInit = function () {
        var oInit = new Object();
        var postdata = {};

        oInit.Init = function () {
            //初始化页面上面的按钮事件
        };
        return oInit;
    };
    var TableInit = function () {
        var oTableInit = new Object();
        //初始化Table
        oTableInit.Init = function () {
            $('#tb_departments').bootstrapTable({
                url     : "/users/list",         //请求后台的URL（*）
                method  : 'get',                      //请求方式（*）
                toolbar : '#toolbar',                //工具按钮用哪个容器
                striped : true,                      //是否显示行间隔色
                cache   : false,                       //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
                pagination: true,                   //是否显示分页（*）
                sortable: true,                     //是否启用排序
                sortOrder: "desc",                   //排序方式
                queryParams: oTableInit.queryParams,//传递参数（*）
                sidePagination: "server",           //分页方式：client客户端分页，server服务端分页（*）
                pageNumber:1,                       //初始化加载第一页，默认第一页
                pageSize: 10,                       //每页的记录行数（*）
                pageList: [5, 10, 25, 50, 100],        //可供选择的每页的行数（*）
                search: false,                       //是否显示表格搜索，此搜索是客户端搜索，不会进服务端，所以，个人感觉意义不大
                strictSearch: false,
                showColumns: false,                  //是否显示所有的列
                showRefresh: false,                  //是否显示刷新按钮
                minimumCountColumns: 2,             //最少允许的列数
                clickToSelect: true,                //是否启用点击选中行
                singleSelect:true,                  //开启单选按钮
                // height: 500,                        //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
                uniqueId: "id",                     //每一行的唯一标识，一般为主键列
                showToggle:false,                    //是否显示详细视图和列表视图的切换按钮
                cardView: false,                    //是否显示详细视图
                detailView: false,                   //是否显示父子表
                columns: [{
                    checkbox: true
                }, {
                    field: 'id',
                    title: 'id'
                }, {
                    field: 'username',
                    title: '用户名称'
                }, {
                    field: 'nickname',
                    title: '昵称'
                }, {
                    field: 'mobile',
                    title: '手机号'
                }, {
                    field: 'email',
                    title: '邮箱地址'
                }, {
                    field: 'qq',
                    title: 'QQ'
                }, {
                    field: 'gender',
                    title: '性别',
                    formatter:function (value, row, index) {
                        var gender = row.gender;
                        var str = "";
                        if(gender == 1){
                            str = "<span value='1'>男</span>";
                        } else {
                            str = "<span value='2'>女</span>";
                        }
                        return str;
                    }
                },{
                    field: 'userType',
                    title: "用户类型"
                },{
                    field: 'lastLoginTime',
                    title: '最近登录时间'
                }, {
                    field: 'loginCount',
                    title: '登录次数'
                },{
                    field: 'remark',
                    title: '用户备注'
                },{
                    field: 'status',
                    title: '状态',
                    formatter:function (value, row, index) {
                        var status = row.status;
                        var str = "";
                        if(status == 0){
                            str = "<span style='color: red'>禁用</span>";
                        } else {
                            str = "<span style='color: green'>启用</span>";
                        }
                        return str;
                    }
                }, {
                    field: 'operate',
                    title: '操作',
                    align: 'center',
                    // width: 120,
                    valign:'middle',
                    formatter: function(value, row, index){
                        return getPermission(value, row, index);
                    }
                }]
            });
        };


        //表格搜索：查询的参数
        oTableInit.queryParams = function (params) {
            var temp = {   //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
                limit   : params.limit,   //页面大小
                offset  : params.offset,  //页码
                page    : params.offset / params.limit +1,
                // search: params.search, //表格搜索
                sort    : params.order, //排序
                username: $("#txt_search_departmentname").val(), //查询的参数
                status  : $("#txt_search_status").val(),
            };
            return temp;
        };

        oTableInit.refresh = function () {
            $("#tb_departments").bootstrapTable('refresh', {
                url:"/users/list",
            })
        }
        return oTableInit;
    };
    //搜索查询
    function refreshData() {
        //获取表格的参数
        var ta = $("#tb_departments").bootstrapTable('getOptions');
        // console.log(ta.columns); //获取bootstrap columns属性
        $("#tb_departments").bootstrapTable('refreshOptions', {
            columns     : ta.columns,
            url         : "/users/list",
            pageNumber  : 1, //再次查询的起始页从第1页开始显示
            queryParams : function (params) {
                return {
                    limit   : params.limit,   //页面大小
                    offset  : params.offset,  //页码
                    rows    : params.limit, //页面大小
                    page    : params.offset / params.limit + 1,
                    username: $("#txt_search_username").val(),  //用户名称
                    nickname: $("#txt_search_nickname").val(),  //昵称
                    mobile  : $("#txt_search_mobile").val(),    //手机号
                    email   : $("#txt_search_email").val(),     //邮箱地址
                    qq      : $("#txt_search_qq").val(),        //qq
                }
            },
        });
    };

</script>
</body>
</html>